<template>
   <div class="house-item">
    <div class="left">
      <img :src="'http://www.xiaoshuaipeng.com:8080'+ item.houseImg" alt="">
    </div>
    <div class="right">
      <h2>{{item.title}}</h2>
      <p>{{item.desc}}</p>
      <div class="house-tag">
      <span  v-for="(item1,index) in item.tags" :key="index" :class="index">{{item1}}</span>
      </div>
      <div class="price">
        <span>{{item.price}}</span> 元/月
      </div>
    </div>
  </div>
</template>

<script>
export default {
  props: {
    item: { type: Object }
  }
}
</script>

<style lang="less" scoped>
*{
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  line-height: 1.5;

  img{
    width: 100%;
    height: 100%;
  }
}
  .house-item{
    display: flex;
    justify-content: center;
    padding-top: 18px;
    height: 130px;
    border-bottom: 1px solid #e5e5e5;
    .left{
      width: 106px;
      height: 80px;
    }
    .right{
      margin-left: 12px;
      width: 227px;
    h2{
        margin: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        vertical-align: middle;
        font-size: 15px;
        color: #394043;
      }
      p{
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        vertical-align: middle;
        font-size: 12px;
        color: #afb2b3;
      }
      .house-tag{
        span{
            display: inline-block;
            font-size: 12px;
            border-radius: 3px;
            padding: 4px 5px;
            margin-right: 5px;
            line-height: 12px;
       &:nth-child(1){
            color: #39becd;
            background: #e1f5f8;
      }
           &:nth-child(2){
       color: #3fc28c;
      background: #e1f5ed;
            }
         &:nth-child(3){
      color: #5aabfd;
      background: #e6f2ff;
            }
        }
      }
      .price{
        font-size: 12px;
        color: #fa5741;
        span {
    font-size: 16px;
    font-weight: bolder;
        }
      }
    }
  }
</style>
